<% layout('/layouts/default.html', {title: '结算记录', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa fa-list-alt"></i> ${text('结算记录')}
			</div>
			<div class="box-tools pull-right">
<!-- 				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a> -->
<!-- 				<% if(hasPermi('settlementrecord:settlementRecord:edit')){ %> -->
<!-- 					<a href="${ctx}/settlementrecord/settlementRecord/form" class="btn btn-default btnTool" title="${text('新增结算记录')}"><i class="fa fa-plus"></i> ${text('新增')}</a> -->
<!-- 				<% } %> -->
			</div>
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${settlementRecord}" action="${ctx}/settlementrecord/settlementRecord/listData?natatoriumInfoId=${settlementRecord.natatoriumInfoId}" method="post" class="form-inline hide"
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
			</#form:form>
			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [
		{header:'${text('结算概览')}', name:'settlementApply.settlementOverview', index:'', width:450, align:"center"},
		{header:'${text('创建时间')}', name:'settlementApply.createDate', index:'a.create_date', width:150, align:"center"},
		{header:'${text('结算金额')}', name:'settlementAmount', index:'a.settlement_amount', width:150, align:"center", formatter: function(val, obj, row, act){
			return js.formatNumber(val, 2, false, ''); // 数值类型格式化 (原始数值, 小数位数, 是否千分位, 默认值，金额情况下设置0.00);
		}},
		{header:'${text('结算时间')}', name:'settlementTime', index:'a.settlement_time', width:150, align:"center"},
		{header:'${text('提交人')}', name:'createBy', index:'a.create_by', width:150, align:"center"},
		{header:'${text('操作')}', name:'actions', width:120, sortable:false, title:false, align:"center", formatter: function(val, obj, row, act){
			var actions = [];
			actions.push('<a href="${ctx}/settlementrecord/settlementRecord/natatoriumDetails?id='+row.id+'" class="btn btnList btn-operation" title="查看详情">${text("详情")}</a>&nbsp;');
			return actions.join('');
		}}
	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});
</script>